package com.example.springboot002;

import com.example.springboot002.service.SomeService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;

/**
 * @description: TODO
 * @author: uu
 * @data: 2023/6/11 19:36
 * @version: v1.0
 */

@SpringBootTest
public class test {

    @Autowired
    SomeService service;
    @Test
    void test01() {
        service.query(101);
        service.save("lisi",10);
    }


    @Test
    void test02() {
        int sum = 0;
        // 这里的i++ 和 ++i 本质效果相同，但是++i的耗时更短，i++需要一个临时的变量
        for(int i = 1; i<= 100; ++i){
            sum += i;
        }
        System.out.println("sum = " + sum);
    }

    @Test
    void test03() {
        String sql = "select * from t_user where id = ?";

    }
}
